//
//  RefundPopViewController.m
//  体育商城
//
//  Created by  on 2022/9/24.
//

#import "RefundPopViewController.h"

@interface RefundPopViewController ()

@end

@implementation RefundPopViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    [self initUI];
}
- (void)initUI{
    CGRect bounds = CGRectMake(0, 0, SCREEN_WIDTH, self.bgView.frame.size.height);
    UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(20, 20)];
    CAShapeLayer *layer = [CAShapeLayer layer];
    layer.frame = bounds;
    layer.path = path.CGPath;
    self.bgView.layer.mask = layer;
}
- (IBAction)actionForBtn:(UIButton *)sender {
    switch (sender.tag){
        case 201:///取消
            [self dismissViewControllerAnimated:true completion:nil];
            break;
        case 202:
        case 203:
            self.selectBtn1.selected = sender == self.selectBtn1;
            self.selectBtn2.selected = sender == self.selectBtn2;
            break;
        case 204:
            [self dismissViewControllerAnimated:NO completion:nil];
            if (self.block) {
                NSString *text = self.selectBtn1.selected ? LS(@"我要退款") : LS(@"我要退货退款");
                self.block(text);
            }
            break;
        default:
            break;
    }
}

@end
